package com.example.phonestore.controller;


import jakarta.servlet.http.HttpSession;
import org.springframework.web.bind.annotation.ExceptionHandler;
public class BaseController {


    protected final Integer getuidFromSession(HttpSession session){
        return Integer.valueOf(session.getAttribute("uid").toString());
    }


    protected final String getUsernameFromSession(HttpSession session){
        return session.getAttribute("username").toString();
    }
}
